    <div id="playlist-table">
<h1><span></span>
    <?= $this->translate('My Playlists') ?>
</h1>

<a href="<?= $this->url(array('action' => 'edit-playlist', 'id' => null)) ?>" onclick="this.href += '?name='+prompt('<?= $this->translate('Playlist name') ?>', 'New Playlist')">
                <?= $this->translate('New Playlist') ?>
                </a>

<div id="playlists">
<table>
    <thead>
        <tr>
            <th>
                <?= $this->translate('Playlist') ?>
            </th>

            <th>
                <?= $this->translate('Created') ?>
            </th>

            <th>

                <?= $this->translate('Export') ?>
            </th>

            <th>
                <?= $this->translate('Edit') ?>
            </th>


            <th>
                <?= $this->translate('Delete') ?>
            </th>

        </tr>
    </thead>
    <tbody>


        <?php foreach ($this->fm_playlists->playlists->playlist as $playlist): ?>
        <tr>
            <td>
                <a href="<?= $this->url(array('action' => 'play', 'id' => (int)$playlist->id, "fm" => "true")) ?>">
                <?= $this->escape((string)$playlist->title) ?>
                </a>
            </td>
            <td>
                <?= (string)$playlist->date ?>
            </td>

  <td>
                <a href="<?= $this->url(array('action' => 'xml-playlist', 'id' => (int)$playlist->id)) ?>">
                XML
                </a>

            </td>

            <td>
                <a href="<?= $this->url(array('action' => 'edit-playlist', 'id' => (int)$playlist->id)) ?>">
                <?= $this->translate('Edit') ?>
                </a>
            </td>

             <td>
                <a href="<?= $this->url(array('action' => 'delete-playlist', 'id' => (int)$playlist->id)) ?>" onclick="return confirm('<?= $this->translate('Are You sure?') ?>')">
                <?= $this->translate('Delete') ?>
                </a>
            </td>


        <?php endforeach ?>


        <?php foreach ($this->playlists as $playlist): ?>




        <tr>
            <td>
                <a href="<?= $this->url(array('action' => 'play', 'id' => $playlist['id'])) ?>">
                <?= $this->escape($playlist['name']) ?>
                </a>
            </td>
            <td>
                <?= $playlist['date_created'] ?>
            </td>
            
  <td>
                <a href="<?= $this->url(array('action' => 'xml-playlist', 'id' => $playlist['id'])) ?>">
                XML
                </a>
            
            </td>

            <td>
                <a href="<?= $this->url(array('action' => 'edit-playlist', 'id' => $playlist['id'])) ?>">
                <?= $this->translate('Edit') ?>
                </a>
            </td>

             <td>
                <a href="<?= $this->url(array('action' => 'delete-playlist', 'id' => $playlist['id'])) ?>" onclick="return confirm('<?= $this->translate('Are You sure?') ?>')">
                <?= $this->translate('Delete') ?>
                </a>
            </td>
        </tr>

        <?php endforeach ?>
        
    </tbody>
</table>
    </div>

    </div>